<%@page
	import="com.sun.xml.internal.fastinfoset.algorithm.UUIDEncodingAlgorithm"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>Mua~亲亲宠———${user.name}的个人资料</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap theme -->
<link href="css/bootstrap-theme.min.css" rel="stylesheet">
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
	<%@ include file="/WEB-INF/jsp/top.jspf"%>
	<%
		User user = (User) request.getAttribute("user");
	%>
	<div class="title"></div>
	<div class="col-sm-offset-3 col-sm-6 row">
		<div class="page-header" style="color:#000099">
			<h3>
				${user.name}的个人资料
				<%
					if (loginUser != null && user.getId().equals(loginUser.getId())) {
				%><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
					href="user/editSelf.do"><button class="btn btn-sm  btn-info">编辑个人资料</button>
				</a> </small>
				<%
					}
				%>
			</h3>
		</div>
		<div class="row">
			<img src="${user.icon}" class="img-responsive col-sm-offset-3"
				alt="Generic placeholder thumbnail"
				onerror="this.src='images/user_icon.jpg'" width="120" height="120">
		</div>
		<div class="row">
			<table class="col-sm-offset-2 col-sm-8 row" style="font-size:18px">
				<tbody>
					<tr>
						<td style="width: 40%">&nbsp;昵&nbsp;&nbsp;称：</td>
						<td style="width: 60%">${user.name}</td>
					</tr>
					<tr>
						<td style="width: 40%">&nbsp;性&nbsp;&nbsp;别：</td>
						<td style="width: 60%">
							<%
								if (user.getSex() == null || user.getSex() == User.USER_SEX_NO) {
							%>保密<%
								} else if (user.getSex() == User.USER_SEX_MALE) {
							%>男<%
								} else {
							%>女 <%
								}
							%>
						</td>
					</tr>
					<tr>
						<td style="width: 40%">&nbsp;电&nbsp;&nbsp;话：</td>
						<td style="width: 60%">${user.tel}</td>
					</tr>
					<tr>
						<td style="width: 40%">&nbsp;邮&nbsp;&nbsp;箱：</td>
						<td style="width: 60%">${user.email}</td>
					</tr>
					<tr>
						<td style="width: 40%">实名状态：</td>
						<td style="width: 60%">
							<%
								if (user.getIspass() == null
										|| user.getIspass() == User.USER_ISPASS_NOINFO) {
							%>未填写<%
								} else if (user.getIspass() == User.USER_ISPASS_YES) {
							%>通过<%
								} else if (user.getIspass() == User.USER_ISPASS_NO) {
							%>未通过<%
								} else {
							%>审核中<%
								}
							%>
						</td>
					</tr>
					<tr>
						<td style="width: 40%">注册时间：</td>
						<td style="width: 60%"><fmt:formatDate
								value="${user.registerDate}" pattern="yyyy-MM-dd" />
						</td>
					</tr>
					<tr>
						<td style="width: 40%">上次登录：</td>
						<td style="width: 60%"><fmt:formatDate
								value="${user.lastLoginTime}" pattern="yyyy-MM-dd  HH:mm:ss" />
						</td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
	<script type="text/javascript">
		
	</script>
</body>
</html>
